import java.util.Scanner;

public class ch02 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.println("请问需要多少个数");
        int count = input.nextInt();
        int[] c = new int[count];
        int avg = 0;
        int max = c[0];
        for (int i = 0; i < count ; i++) {
            System.out.println("请输入第" + (i+1) + "个数");
            int s = input.nextInt();
            c[i] = s;
        }
        for (int f=0;f<count;f++){
            avg += c[f];
        }
        avg = avg/count;
        for (int x=1;x<count;x++){
            if (max < c[x]){
                max = c[x];
            }
        }
        System.out.println("平均数：" + avg + "最大值为: " + max);
    }
}
